package com.zmsoft.persistent.sfg.Sfg661030PlayerWarehouse;

import java.util.ArrayList;
import java.util.HashMap;

import org.cnsoft.framework.apidoc.MyApiDocSupport;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * 玩家仓库信息接口
 */
@CrossOrigin
@RestController
@RequestMapping(value = "/doc/1.0/base/sfg661030playerwarehouse", method = { RequestMethod.GET })
public class Sfg661030PlayerWarehouseApiDoc extends MyApiDocSupport {

	// 获得API地址
	public String loadApiDocName() throws Exception {
		return "玩家仓库信息;/doc/1.0/base/sfg661030playerwarehouse/all";
	}

	// API文档描述
	@RequestMapping(value = "/all", method = RequestMethod.GET)
	public HashMap<String, Object> loadApiDocValue() throws Exception {
		HashMap<String, Object> all = new HashMap<String, Object>();
		// 输出基本信息
		all.put("name", "玩家仓库信息");
		all.put("baseurl", "/api/1.0/base/sfg661030playerwarehouse");
		// 输出API列表
		{
			ArrayList<Object> list = new ArrayList<Object>();
			list.add("/list");
			list.add("/info");
			list.add("/append");
			list.add("/modify");
			list.add("/discard");
			all.put("apilist", list);
		}
		// 输出字段信息
		{
			ArrayList<Object> list = new ArrayList<Object>();
			HashMap<String, Object> item;
			{
				item = new HashMap<String, Object>();
				item.put("enname", "playerId");
				item.put("cnname", "用户ID");
				item.put("datatype", "String");
				item.put("memo", "");

				list.add(item);
			}
			{
				item = new HashMap<String, Object>();
				item.put("enname", "playerName");
				item.put("cnname", "用户昵称");
				item.put("datatype", "String");
				item.put("memo", "");

				list.add(item);
			}
			{
				item = new HashMap<String, Object>();
				item.put("enname", "propId");
				item.put("cnname", "物品ID");
				item.put("datatype", "String");
				item.put("memo", "");

				list.add(item);
			}
			{
				item = new HashMap<String, Object>();
				item.put("enname", "propName");
				item.put("cnname", "物品名称");
				item.put("datatype", "String");
				item.put("memo", "");

				list.add(item);
			}
			{
				item = new HashMap<String, Object>();
				item.put("enname", "propNum");
				item.put("cnname", "物品数量");
				item.put("datatype", "Long");
				item.put("memo", "");

				list.add(item);
			}
			{
				item = new HashMap<String, Object>();
				item.put("enname", "propType");
				item.put("cnname", "物品类别(1农作物2家畜3水产5产品9其他)");
				item.put("datatype", "String");
				item.put("memo", "");

				list.add(item);
			}
			{
				item = new HashMap<String, Object>();
				item.put("enname", "propVolume");
				item.put("cnname", "单一物品占用仓库容积大小");
				item.put("datatype", "Long");
				item.put("memo", "");

				list.add(item);
			}
			all.put("itemlist", list);
		}

		return all;
	}

}
